package com.chen.serviceorder.remote;

import com.chen.internalcommon.dto.PriceRule;
import com.chen.internalcommon.dto.ResponseResult;
import com.chen.internalcommon.request.PriceRuleIsNewRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author chenLiuPing
 **/
@FeignClient("service-price")
public interface ServicePriceClient {

    /**
     * 判断计价规则是否最新
     * @param priceRuleIsNewRequest
     * @return
     */
    @PostMapping("/price-rule/is-new")
    ResponseResult isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

    @PostMapping("/price-rule/if-exists")
    ResponseResult<Boolean> ifExists(@RequestBody PriceRule priceRule);

}
